package com.rpc.register;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * 本地存储 接口实现
 * @Author:cxy
 * @Date:2021/1/21 21:03
 */
public class LocalRegister {
    private static final Map<String,Class<?>> LOCAL_REGISTER = new ConcurrentHashMap<>();

    public static void regist(String interfaceName, Class<?> implClass){
        LOCAL_REGISTER.put(interfaceName, implClass);
    }

    public static Class<?> get(String insterfaceName){
        return LOCAL_REGISTER.get(insterfaceName);
    }


}
